<?php
$tdatacompanies=array();
	$tdatacompanies[".NumberOfChars"]=80; 
	$tdatacompanies[".ShortName"]="companies";
	$tdatacompanies[".OwnerID"]="";
	$tdatacompanies[".OriginalTable"]="companies";


	
//	field labels
$fieldLabelscompanies = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelscompanies["English"]=array();
	$fieldToolTipscompanies["English"]=array();
	$fieldLabelscompanies["English"]["id"] = "Id";
	$fieldToolTipscompanies["English"]["id"] = "";
	$fieldLabelscompanies["English"]["code"] = "Code";
	$fieldToolTipscompanies["English"]["code"] = "";
	$fieldLabelscompanies["English"]["company_name"] = "Company Name";
	$fieldToolTipscompanies["English"]["company_name"] = "";
	$fieldLabelscompanies["English"]["category"] = "Category";
	$fieldToolTipscompanies["English"]["category"] = "";
	$fieldLabelscompanies["English"]["address"] = "Address";
	$fieldToolTipscompanies["English"]["address"] = "";
	$fieldLabelscompanies["English"]["city_id"] = "City";
	$fieldToolTipscompanies["English"]["city_id"] = "";
	$fieldLabelscompanies["English"]["state_id"] = "State";
	$fieldToolTipscompanies["English"]["state_id"] = "";
	$fieldLabelscompanies["English"]["country_id"] = "Country";
	$fieldToolTipscompanies["English"]["country_id"] = "";
	$fieldLabelscompanies["English"]["phone1"] = "Phone 1";
	$fieldToolTipscompanies["English"]["phone1"] = "";
	$fieldLabelscompanies["English"]["phone2"] = "Phone 2";
	$fieldToolTipscompanies["English"]["phone2"] = "";
	$fieldLabelscompanies["English"]["fax1"] = "Fax 1";
	$fieldToolTipscompanies["English"]["fax1"] = "";
	$fieldLabelscompanies["English"]["fax2"] = "Fax 2";
	$fieldToolTipscompanies["English"]["fax2"] = "";
	$fieldLabelscompanies["English"]["email"] = "Email";
	$fieldToolTipscompanies["English"]["email"] = "";
	$fieldLabelscompanies["English"]["website"] = "Website";
	$fieldToolTipscompanies["English"]["website"] = "";
	$fieldLabelscompanies["English"]["display_name"] = "Printable Name";
	$fieldToolTipscompanies["English"]["display_name"] = "";
	$fieldLabelscompanies["English"]["gmap"] = "Gmap";
	$fieldToolTipscompanies["English"]["gmap"] = "";
	$fieldLabelscompanies["English"]["pin_code"] = "Pin Code";
	$fieldToolTipscompanies["English"]["pin_code"] = "";
	if (count($fieldToolTipscompanies["English"])){
		$tdatacompanies[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Hong Kong S.A.R.)")
{
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["id"] = "Id";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["id"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["code"] = "Code";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["code"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["company_name"] = "Company Name";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["company_name"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["category"] = "Category";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["category"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["address"] = "Address";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["address"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["city_id"] = "City Id";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["city_id"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["state_id"] = "State Id";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["state_id"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["country_id"] = "Country Id";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["country_id"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["phone1"] = "Phone1";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["phone1"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["phone2"] = "Phone2";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["phone2"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["fax1"] = "Fax1";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["fax1"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["fax2"] = "Fax2";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["fax2"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["email"] = "Email";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["email"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["website"] = "Website";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["website"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["display_name"] = "Display Name";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["display_name"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["gmap"] = "Gmap";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["gmap"] = "";
	$fieldLabelscompanies["Chinese (Hong Kong S.A.R.)"]["pin_code"] = "Pin Code";
	$fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"]["pin_code"] = "";
	if (count($fieldToolTipscompanies["Chinese (Hong Kong S.A.R.)"])){
		$tdatacompanies[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Taiwan)")
{
	$fieldLabelscompanies["Chinese (Taiwan)"]=array();
	$fieldToolTipscompanies["Chinese (Taiwan)"]=array();
	$fieldLabelscompanies["Chinese (Taiwan)"]["id"] = "Id";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["id"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["code"] = "Code";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["code"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["company_name"] = "Company Name";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["company_name"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["category"] = "Category";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["category"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["address"] = "Address";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["address"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["city_id"] = "City Id";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["city_id"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["state_id"] = "State Id";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["state_id"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["country_id"] = "Country Id";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["country_id"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["phone1"] = "Phone1";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["phone1"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["phone2"] = "Phone2";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["phone2"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["fax1"] = "Fax 1";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["fax1"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["fax2"] = "Fax2";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["fax2"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["email"] = "Email";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["email"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["website"] = "Website";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["website"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["display_name"] = "Display Name";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["display_name"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["gmap"] = "Gmap";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["gmap"] = "";
	$fieldLabelscompanies["Chinese (Taiwan)"]["pin_code"] = "Pin Code";
	$fieldToolTipscompanies["Chinese (Taiwan)"]["pin_code"] = "";
	if (count($fieldToolTipscompanies["Chinese (Taiwan)"])){
		$tdatacompanies[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="French")
{
	$fieldLabelscompanies["French"]=array();
	$fieldToolTipscompanies["French"]=array();
	$fieldLabelscompanies["French"]["id"] = "Id";
	$fieldToolTipscompanies["French"]["id"] = "";
	$fieldLabelscompanies["French"]["code"] = "Code";
	$fieldToolTipscompanies["French"]["code"] = "";
	$fieldLabelscompanies["French"]["company_name"] = "Company Name";
	$fieldToolTipscompanies["French"]["company_name"] = "";
	$fieldLabelscompanies["French"]["category"] = "Category";
	$fieldToolTipscompanies["French"]["category"] = "";
	$fieldLabelscompanies["French"]["address"] = "Address";
	$fieldToolTipscompanies["French"]["address"] = "";
	$fieldLabelscompanies["French"]["city_id"] = "City Id";
	$fieldToolTipscompanies["French"]["city_id"] = "";
	$fieldLabelscompanies["French"]["state_id"] = "State Id";
	$fieldToolTipscompanies["French"]["state_id"] = "";
	$fieldLabelscompanies["French"]["country_id"] = "Country Id";
	$fieldToolTipscompanies["French"]["country_id"] = "";
	$fieldLabelscompanies["French"]["phone1"] = "Phone1";
	$fieldToolTipscompanies["French"]["phone1"] = "";
	$fieldLabelscompanies["French"]["phone2"] = "Phone2";
	$fieldToolTipscompanies["French"]["phone2"] = "";
	$fieldLabelscompanies["French"]["fax1"] = "Fax1";
	$fieldToolTipscompanies["French"]["fax1"] = "";
	$fieldLabelscompanies["French"]["fax2"] = "Fax2";
	$fieldToolTipscompanies["French"]["fax2"] = "";
	$fieldLabelscompanies["French"]["email"] = "Email";
	$fieldToolTipscompanies["French"]["email"] = "";
	$fieldLabelscompanies["French"]["website"] = "Website";
	$fieldToolTipscompanies["French"]["website"] = "";
	$fieldLabelscompanies["French"]["display_name"] = "Display Name";
	$fieldToolTipscompanies["French"]["display_name"] = "";
	$fieldLabelscompanies["French"]["gmap"] = "Gmap";
	$fieldToolTipscompanies["French"]["gmap"] = "";
	$fieldLabelscompanies["French"]["pin_code"] = "Pin Code";
	$fieldToolTipscompanies["French"]["pin_code"] = "";
	if (count($fieldToolTipscompanies["French"])){
		$tdatacompanies[".isUseToolTips"]=true;
	}
}


	
	$tdatacompanies[".NCSearch"]=true;

	

$tdatacompanies[".shortTableName"] = "companies";
$tdatacompanies[".nSecOptions"] = 0;
$tdatacompanies[".recsPerRowList"] = 1;	
$tdatacompanies[".tableGroupBy"] = "0";
$tdatacompanies[".mainTableOwnerID"] = "";
$tdatacompanies[".moveNext"] = 1;




$tdatacompanies[".showAddInPopup"] = false;

$tdatacompanies[".showEditInPopup"] = false;

$tdatacompanies[".showViewInPopup"] = false;


$tdatacompanies[".fieldsForRegister"] = array();

$tdatacompanies[".listAjax"] = true;

	$tdatacompanies[".audit"] = false;

	$tdatacompanies[".locking"] = false;
	
$tdatacompanies[".listIcons"] = true;
$tdatacompanies[".edit"] = true;
$tdatacompanies[".inlineEdit"] = true;
$tdatacompanies[".copy"] = true;
$tdatacompanies[".view"] = true;

$tdatacompanies[".exportTo"] = true;

$tdatacompanies[".printFriendly"] = true;

$tdatacompanies[".delete"] = true;

$tdatacompanies[".showSimpleSearchOptions"] = true;

$tdatacompanies[".showSearchPanel"] = true;


$tdatacompanies[".isUseAjaxSuggest"] = true;

$tdatacompanies[".rowHighlite"] = true;


// button handlers file names

$tdatacompanies[".addPageEvents"] = false;

$tdatacompanies[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatacompanies[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatacompanies[".isUseTimeForSearch"] = false;

$tdatacompanies[".isUseiBox"] = false;



$tdatacompanies[".isUseInlineAdd"] = true;

$tdatacompanies[".isUseInlineEdit"] = true;
$tdatacompanies[".isUseInlineJs"] = $tdatacompanies[".isUseInlineAdd"] || $tdatacompanies[".isUseInlineEdit"];

$tdatacompanies[".allSearchFields"] = array();

$tdatacompanies[".globSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "id";	
}
$tdatacompanies[".globSearchFields"][] = "company_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("company_name", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "company_name";	
}
$tdatacompanies[".globSearchFields"][] = "display_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("display_name", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "display_name";	
}
$tdatacompanies[".globSearchFields"][] = "code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("code", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "code";	
}
$tdatacompanies[".globSearchFields"][] = "category";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("category", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "category";	
}
$tdatacompanies[".globSearchFields"][] = "address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("address", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "address";	
}
$tdatacompanies[".globSearchFields"][] = "city_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("city_id", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "city_id";	
}
$tdatacompanies[".globSearchFields"][] = "state_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("state_id", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "state_id";	
}
$tdatacompanies[".globSearchFields"][] = "country_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("country_id", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "country_id";	
}
$tdatacompanies[".globSearchFields"][] = "pin_code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("pin_code", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "pin_code";	
}
$tdatacompanies[".globSearchFields"][] = "phone1";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("phone1", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "phone1";	
}
$tdatacompanies[".globSearchFields"][] = "phone2";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("phone2", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "phone2";	
}
$tdatacompanies[".globSearchFields"][] = "fax1";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("fax1", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "fax1";	
}
$tdatacompanies[".globSearchFields"][] = "fax2";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("fax2", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "fax2";	
}
$tdatacompanies[".globSearchFields"][] = "email";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("email", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "email";	
}
$tdatacompanies[".globSearchFields"][] = "website";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("website", $tdatacompanies[".allSearchFields"]))
{
	$tdatacompanies[".allSearchFields"][] = "website";	
}


$tdatacompanies[".googleLikeFields"][] = "gmap";
$tdatacompanies[".googleLikeFields"][] = "id";
$tdatacompanies[".googleLikeFields"][] = "company_name";
$tdatacompanies[".googleLikeFields"][] = "display_name";
$tdatacompanies[".googleLikeFields"][] = "code";
$tdatacompanies[".googleLikeFields"][] = "category";
$tdatacompanies[".googleLikeFields"][] = "address";
$tdatacompanies[".googleLikeFields"][] = "city_id";
$tdatacompanies[".googleLikeFields"][] = "state_id";
$tdatacompanies[".googleLikeFields"][] = "country_id";
$tdatacompanies[".googleLikeFields"][] = "pin_code";
$tdatacompanies[".googleLikeFields"][] = "phone1";
$tdatacompanies[".googleLikeFields"][] = "phone2";
$tdatacompanies[".googleLikeFields"][] = "fax1";
$tdatacompanies[".googleLikeFields"][] = "fax2";
$tdatacompanies[".googleLikeFields"][] = "email";
$tdatacompanies[".googleLikeFields"][] = "website";



$tdatacompanies[".advSearchFields"][] = "gmap";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("gmap", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "gmap";	
}
$tdatacompanies[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "id";	
}
$tdatacompanies[".advSearchFields"][] = "company_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("company_name", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "company_name";	
}
$tdatacompanies[".advSearchFields"][] = "display_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("display_name", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "display_name";	
}
$tdatacompanies[".advSearchFields"][] = "code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("code", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "code";	
}
$tdatacompanies[".advSearchFields"][] = "category";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("category", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "category";	
}
$tdatacompanies[".advSearchFields"][] = "address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("address", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "address";	
}
$tdatacompanies[".advSearchFields"][] = "city_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("city_id", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "city_id";	
}
$tdatacompanies[".advSearchFields"][] = "state_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("state_id", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "state_id";	
}
$tdatacompanies[".advSearchFields"][] = "country_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("country_id", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "country_id";	
}
$tdatacompanies[".advSearchFields"][] = "pin_code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("pin_code", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "pin_code";	
}
$tdatacompanies[".advSearchFields"][] = "phone1";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("phone1", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "phone1";	
}
$tdatacompanies[".advSearchFields"][] = "phone2";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("phone2", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "phone2";	
}
$tdatacompanies[".advSearchFields"][] = "fax1";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("fax1", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "fax1";	
}
$tdatacompanies[".advSearchFields"][] = "fax2";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("fax2", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "fax2";	
}
$tdatacompanies[".advSearchFields"][] = "email";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("email", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "email";	
}
$tdatacompanies[".advSearchFields"][] = "website";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("website", $tdatacompanies[".allSearchFields"])) 
{
	$tdatacompanies[".allSearchFields"][] = "website";	
}

$tdatacompanies[".isTableType"] = "list";


	

$tdatacompanies[".isDisplayLoading"] = true;

$tdatacompanies[".isResizeColumns"] = false;





$tdatacompanies[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatacompanies[".strOrderBy"] = $gstrOrderBy;
	
$tdatacompanies[".orderindexes"] = array();

$tdatacompanies[".sqlHead"] = "SELECT id,  code,  company_name,  category,  address,  city_id,  state_id,  country_id,  phone1,  phone2,  fax1,  fax2,  email,  website,  display_name,  '' AS gmap,  pin_code";
$tdatacompanies[".sqlFrom"] = "FROM companies";
$tdatacompanies[".sqlWhereExpr"] = "";
$tdatacompanies[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatacompanies[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatacompanies[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatacompanies[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["id"]=$fdata;
//	code
	$fdata = array();
	$fdata["strName"] = "code";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Code"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "code";
	
		$fdata["FullName"]= "code";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=5";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["code"]=$fdata;
//	company_name
	$fdata = array();
	$fdata["strName"] = "company_name";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Company Name"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "company_name";
	
		$fdata["FullName"]= "company_name";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=25";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["company_name"]=$fdata;
//	category
	$fdata = array();
	$fdata["strName"] = "category";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Category"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=0;
	$fdata["pLookupType"] = 0;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
									$fdata["LookupValues"]=array();
	$fdata["LookupValues"][]="Buyer";
	$fdata["LookupValues"][]="Supplier";
	$fdata["LookupValues"][]="Bank";
	$fdata["LookupValues"][]="Account";
			
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "category";
	
		$fdata["FullName"]= "category";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 4;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["category"]=$fdata;
//	address
	$fdata = array();
	$fdata["strName"] = "address";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Address"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "address";
	
		$fdata["FullName"]= "address";
	
		
		
		
		
		
				$fdata["Index"]= 5;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["address"]=$fdata;
//	city_id
	$fdata = array();
	$fdata["strName"] = "city_id";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="City"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="city_name";
				$fdata["LookupTable"]="cities";
	$fdata["LookupOrderBy"]="city_name";
																$fdata["AllowToAdd"]=true; 
				
				//	dependent dropdowns	
	$fdata["DependentLookups"]=array();
	$fdata["DependentLookups"][]="state_id";
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "city_id";
	
		$fdata["FullName"]= "city_id";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["city_id"]=$fdata;
//	state_id
	$fdata = array();
	$fdata["strName"] = "state_id";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="State"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "Custom";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="state_name";
				$fdata["LookupTable"]="states";
	$fdata["LookupOrderBy"]="state_name";
										$fdata["UseCategory"]=true; 
	$fdata["CategoryControl"]="city_id"; 
	$fdata["CategoryFilter"]="id"; 
										
				//	dependent dropdowns	
	$fdata["DependentLookups"]=array();
	$fdata["DependentLookups"][]="country_id";
					
		
		
		
	$fdata["GoodName"]= "state_id";
	
		$fdata["FullName"]= "state_id";
	
		
		
		
		
		
				$fdata["Index"]= 7;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["state_id"]=$fdata;
//	country_id
	$fdata = array();
	$fdata["strName"] = "country_id";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Country"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "Custom";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="country_name";
				$fdata["LookupTable"]="countries";
	$fdata["LookupOrderBy"]="country_name";
										$fdata["UseCategory"]=true; 
	$fdata["CategoryControl"]="state_id"; 
	$fdata["CategoryFilter"]="id"; 
										
					
		
		
		
	$fdata["GoodName"]= "country_id";
	
		$fdata["FullName"]= "country_id";
	
		
		
		
		
		
				$fdata["Index"]= 8;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["country_id"]=$fdata;
//	phone1
	$fdata = array();
	$fdata["strName"] = "phone1";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Phone 1"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "phone1";
	
		$fdata["FullName"]= "phone1";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 9;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Regular expression");	
				$fdata["validateAs"]["regExp"] = array("regex" => "[0-9-x]{5,18}", "message" => "Invalid phone number(example 00-12345679 can include - and x for extension)", "messagetype" => "Text");		
			$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["phone1"]=$fdata;
//	phone2
	$fdata = array();
	$fdata["strName"] = "phone2";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Phone 2"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "phone2";
	
		$fdata["FullName"]= "phone2";
	
		
		
		
		
		
				$fdata["Index"]= 10;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Regular expression");	
				$fdata["validateAs"]["regExp"] = array("regex" => "[0-9-x]{5,18}", "message" => "Invalid phone number(example 00-12345679 can include - and x for extension)", "messagetype" => "Text");		
			
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["phone2"]=$fdata;
//	fax1
	$fdata = array();
	$fdata["strName"] = "fax1";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Fax 1"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "fax1";
	
		$fdata["FullName"]= "fax1";
	
		
		
		
		
		
				$fdata["Index"]= 11;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Regular expression");	
				$fdata["validateAs"]["regExp"] = array("regex" => "[0-9-]{5,18}", "message" => "Invalid Fax number", "messagetype" => "Text");		
			
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["fax1"]=$fdata;
//	fax2
	$fdata = array();
	$fdata["strName"] = "fax2";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Fax 2"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "fax2";
	
		$fdata["FullName"]= "fax2";
	
		
		
		
		
		
				$fdata["Index"]= 12;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Regular expression");	
				$fdata["validateAs"]["regExp"] = array("regex" => "[0-9-]{5,18}", "message" => "Invalid Fax number", "messagetype" => "Text");		
			
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["fax2"]=$fdata;
//	email
	$fdata = array();
	$fdata["strName"] = "email";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Email"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "email";
	
		$fdata["FullName"]= "email";
	
		
		
		
		
		
				$fdata["Index"]= 13;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Email");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["email"]=$fdata;
//	website
	$fdata = array();
	$fdata["strName"] = "website";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Website"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "website";
	
		$fdata["FullName"]= "website";
	
		
		
		
		
		
				$fdata["Index"]= 14;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Regular expression");	
				$fdata["validateAs"]["regExp"] = array("regex" => "([\\w-]+\\.)+[\\w-]+(/[\\w- ./?%&=]*)?", "message" => "website URL should be www.abc.com", "messagetype" => "Text");		
			
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["website"]=$fdata;
//	display_name
	$fdata = array();
	$fdata["strName"] = "display_name";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Printable Name"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "display_name";
	
		$fdata["FullName"]= "display_name";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 15;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["display_name"]=$fdata;
//	gmap
	$fdata = array();
	$fdata["strName"] = "gmap";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="Gmap"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "Map";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "gmap";
	
		$fdata["FullName"]= "''";
	
		
		
		
		
		
				$fdata["Index"]= 16;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$fdata["mapData"] = array();
		$fdata["mapData"]['width'] = 300;
		$fdata["mapData"]['height'] = 225;
		$fdata["mapData"]['address'] = "address";
		$fdata["mapData"]['lat'] = "";
		$fdata["mapData"]['lng'] = "";
		$fdata["mapData"]['desc'] = "";
			$fdata["mapData"]['zoom'] = 15;
		
		$tdatacompanies["gmap"]=$fdata;
//	pin_code
	$fdata = array();
	$fdata["strName"] = "pin_code";
	$fdata["ownerTable"] = "companies";
		$fdata["Label"]="Pin Code"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "pin_code";
	
		$fdata["FullName"]= "pin_code";
	
		
		
		
		
		
				$fdata["Index"]= 17;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacompanies["pin_code"]=$fdata;

	
$tables_data["companies"]=&$tdatacompanies;
$field_labels["companies"] = &$fieldLabelscompanies;
$fieldToolTips["companies"] = &$fieldToolTipscompanies;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["companies"] = array();

	
// tables which are master tables for current table (detail)
$masterTablesData["companies"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto642=array();
$proto642["m_strHead"] = "SELECT";
$proto642["m_strFieldList"] = "id,  code,  company_name,  category,  address,  city_id,  state_id,  country_id,  phone1,  phone2,  fax1,  fax2,  email,  website,  display_name,  '' AS gmap,  pin_code";
$proto642["m_strFrom"] = "FROM companies";
$proto642["m_strWhere"] = "";
$proto642["m_strOrderBy"] = "";
$proto642["m_strTail"] = "";
$proto643=array();
$proto643["m_sql"] = "";
$proto643["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto643["m_column"]=$obj;
$proto643["m_contained"] = array();
$proto643["m_strCase"] = "";
$proto643["m_havingmode"] = "0";
$proto643["m_inBrackets"] = "0";
$proto643["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto643);

$proto642["m_where"] = $obj;
$proto645=array();
$proto645["m_sql"] = "";
$proto645["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto645["m_column"]=$obj;
$proto645["m_contained"] = array();
$proto645["m_strCase"] = "";
$proto645["m_havingmode"] = "0";
$proto645["m_inBrackets"] = "0";
$proto645["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto645);

$proto642["m_having"] = $obj;
$proto642["m_fieldlist"] = array();
						$proto647=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "companies"
));

$proto647["m_expr"]=$obj;
$proto647["m_alias"] = "";
$obj = new SQLFieldListItem($proto647);

$proto642["m_fieldlist"][]=$obj;
						$proto649=array();
			$obj = new SQLField(array(
	"m_strName" => "code",
	"m_strTable" => "companies"
));

$proto649["m_expr"]=$obj;
$proto649["m_alias"] = "";
$obj = new SQLFieldListItem($proto649);

$proto642["m_fieldlist"][]=$obj;
						$proto651=array();
			$obj = new SQLField(array(
	"m_strName" => "company_name",
	"m_strTable" => "companies"
));

$proto651["m_expr"]=$obj;
$proto651["m_alias"] = "";
$obj = new SQLFieldListItem($proto651);

$proto642["m_fieldlist"][]=$obj;
						$proto653=array();
			$obj = new SQLField(array(
	"m_strName" => "category",
	"m_strTable" => "companies"
));

$proto653["m_expr"]=$obj;
$proto653["m_alias"] = "";
$obj = new SQLFieldListItem($proto653);

$proto642["m_fieldlist"][]=$obj;
						$proto655=array();
			$obj = new SQLField(array(
	"m_strName" => "address",
	"m_strTable" => "companies"
));

$proto655["m_expr"]=$obj;
$proto655["m_alias"] = "";
$obj = new SQLFieldListItem($proto655);

$proto642["m_fieldlist"][]=$obj;
						$proto657=array();
			$obj = new SQLField(array(
	"m_strName" => "city_id",
	"m_strTable" => "companies"
));

$proto657["m_expr"]=$obj;
$proto657["m_alias"] = "";
$obj = new SQLFieldListItem($proto657);

$proto642["m_fieldlist"][]=$obj;
						$proto659=array();
			$obj = new SQLField(array(
	"m_strName" => "state_id",
	"m_strTable" => "companies"
));

$proto659["m_expr"]=$obj;
$proto659["m_alias"] = "";
$obj = new SQLFieldListItem($proto659);

$proto642["m_fieldlist"][]=$obj;
						$proto661=array();
			$obj = new SQLField(array(
	"m_strName" => "country_id",
	"m_strTable" => "companies"
));

$proto661["m_expr"]=$obj;
$proto661["m_alias"] = "";
$obj = new SQLFieldListItem($proto661);

$proto642["m_fieldlist"][]=$obj;
						$proto663=array();
			$obj = new SQLField(array(
	"m_strName" => "phone1",
	"m_strTable" => "companies"
));

$proto663["m_expr"]=$obj;
$proto663["m_alias"] = "";
$obj = new SQLFieldListItem($proto663);

$proto642["m_fieldlist"][]=$obj;
						$proto665=array();
			$obj = new SQLField(array(
	"m_strName" => "phone2",
	"m_strTable" => "companies"
));

$proto665["m_expr"]=$obj;
$proto665["m_alias"] = "";
$obj = new SQLFieldListItem($proto665);

$proto642["m_fieldlist"][]=$obj;
						$proto667=array();
			$obj = new SQLField(array(
	"m_strName" => "fax1",
	"m_strTable" => "companies"
));

$proto667["m_expr"]=$obj;
$proto667["m_alias"] = "";
$obj = new SQLFieldListItem($proto667);

$proto642["m_fieldlist"][]=$obj;
						$proto669=array();
			$obj = new SQLField(array(
	"m_strName" => "fax2",
	"m_strTable" => "companies"
));

$proto669["m_expr"]=$obj;
$proto669["m_alias"] = "";
$obj = new SQLFieldListItem($proto669);

$proto642["m_fieldlist"][]=$obj;
						$proto671=array();
			$obj = new SQLField(array(
	"m_strName" => "email",
	"m_strTable" => "companies"
));

$proto671["m_expr"]=$obj;
$proto671["m_alias"] = "";
$obj = new SQLFieldListItem($proto671);

$proto642["m_fieldlist"][]=$obj;
						$proto673=array();
			$obj = new SQLField(array(
	"m_strName" => "website",
	"m_strTable" => "companies"
));

$proto673["m_expr"]=$obj;
$proto673["m_alias"] = "";
$obj = new SQLFieldListItem($proto673);

$proto642["m_fieldlist"][]=$obj;
						$proto675=array();
			$obj = new SQLField(array(
	"m_strName" => "display_name",
	"m_strTable" => "companies"
));

$proto675["m_expr"]=$obj;
$proto675["m_alias"] = "";
$obj = new SQLFieldListItem($proto675);

$proto642["m_fieldlist"][]=$obj;
						$proto677=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "''"
));

$proto677["m_expr"]=$obj;
$proto677["m_alias"] = "gmap";
$obj = new SQLFieldListItem($proto677);

$proto642["m_fieldlist"][]=$obj;
						$proto679=array();
			$obj = new SQLField(array(
	"m_strName" => "pin_code",
	"m_strTable" => "companies"
));

$proto679["m_expr"]=$obj;
$proto679["m_alias"] = "";
$obj = new SQLFieldListItem($proto679);

$proto642["m_fieldlist"][]=$obj;
$proto642["m_fromlist"] = array();
												$proto681=array();
$proto681["m_link"] = "SQLL_MAIN";
			$proto682=array();
$proto682["m_strName"] = "companies";
$proto682["m_columns"] = array();
$proto682["m_columns"][] = "id";
$proto682["m_columns"][] = "code";
$proto682["m_columns"][] = "company_name";
$proto682["m_columns"][] = "category";
$proto682["m_columns"][] = "address";
$proto682["m_columns"][] = "city_id";
$proto682["m_columns"][] = "state_id";
$proto682["m_columns"][] = "country_id";
$proto682["m_columns"][] = "pin_code";
$proto682["m_columns"][] = "port_id";
$proto682["m_columns"][] = "phone1";
$proto682["m_columns"][] = "phone2";
$proto682["m_columns"][] = "fax1";
$proto682["m_columns"][] = "fax2";
$proto682["m_columns"][] = "email";
$proto682["m_columns"][] = "website";
$proto682["m_columns"][] = "display_name";
$obj = new SQLTable($proto682);

$proto681["m_table"] = $obj;
$proto681["m_alias"] = "";
$proto683=array();
$proto683["m_sql"] = "";
$proto683["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto683["m_column"]=$obj;
$proto683["m_contained"] = array();
$proto683["m_strCase"] = "";
$proto683["m_havingmode"] = "0";
$proto683["m_inBrackets"] = "0";
$proto683["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto683);

$proto681["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto681);

$proto642["m_fromlist"][]=$obj;
$proto642["m_groupby"] = array();
$proto642["m_orderby"] = array();
$obj = new SQLQuery($proto642);

$queryData_companies = $obj;
$tdatacompanies[".sqlquery"] = $queryData_companies;

$tableEvents["companies"] = new eventsBase;

?>
